/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。
 * 
 * 欢迎到知启蒙网站（https://www.zhiqim.com）购买正版软件，知启蒙还提供许多开源框架和软件。
 * 
 * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护，其所有知识产权归湖南知启蒙科技有限公司所有；
 * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码，或者基于本软件产品创作衍生作品；
 * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码；
 * 4、个别授权：如需进行商业性的销售、复制、分发，包括但不限于软件销售、预装、捆绑等，必须获得知启蒙的书面授权和许可；
 * 5、保留权利：本注释未明示授权的其他一切权利仍归知启蒙所有，任何人使用其他权利时必须获得知启蒙的书面同意。
*/
package net.redxyz.top.dbo.user;

import java.io.Serializable;

import org.zhiqim.kernel.annotation.AnAlias;
import org.zhiqim.kernel.annotation.AnNew;
import org.zhiqim.kernel.json.Jsons;
import org.zhiqim.orm.annotation.*;

/**
 * 客户表 对应表《USER》
 */
@AnAlias("User")
@AnNew
@AnTable(table="USER", key="NICK", type="InnoDB")
@AnIndex({@AnIndexValue(name="IX_USER_CREATE", column="CREATE_TIME", unique=false)})
public class User implements Serializable
{
    private static final long serialVersionUID = 1L;

    @AnTableField(column="NICK", type="string,50", notNull=true)    private String nick;    //1.用户昵称
    @AnTableField(column="USER_ID", type="string,50", notNull=true)    private String userId;    //2.用户编号，来自淘宝
    @AnTableField(column="USER_STATUS", type="byte", notNull=true)    private int userStatus;    //3.用户状态：0表示正常，1表示到期
    @AnTableField(column="USER_DOMAIN", type="string,50", notNull=true)    private String userDomain;    //4.用户域
    @AnTableField(column="USER_DB", type="byte", notNull=true)    private int userDb;    //5.用户数据库
    @AnTableField(column="USER_POINT", type="long", notNull=true)    private long userPoint;    //6.用户积分
    @AnTableField(column="USER_BALANCE", type="long", notNull=false)    private long userBalance;    //7.用户余额
    @AnTableField(column="USER_SRC", type="string,20", notNull=false)    private String userSrc;    //8.用户来源，为空表示默认淘宝
    @AnTableField(column="USER_SMS_NUM", type="int", notNull=true)    private int userSmsNum;    //9.用户短信条数
    @AnTableField(column="USER_MAIL_NUM", type="int", notNull=true)    private int userMailNum;    //10.用户邮件条数
    @AnTableField(column="SYNC_TMC", type="byte", notNull=true)    private int syncTmc;    //11.是否开启消息服务
    @AnTableField(column="APP_SESSION_ID", type="string,128", notNull=true)    private String appSessionId;    //12.小程序登录sessionId
    @AnTableField(column="OPEN_UID", type="string,128", notNull=false)    private String openUid;    //13.淘宝open_uid
    @AnTableField(column="SESSION_ID", type="string,128", notNull=true)    private String sessionId;    //14.用户当前会话标识，长度不固定
    @AnTableField(column="SESSION_TIME", type="string,19,char", notNull=true)    private String sessionTime;    //15.用户当前会话开启时间,格式yyyy-MM-dd HH:mm:ss
    @AnTableField(column="SESSION_TOKEN", type="string,2048", notNull=true)    private String sessionToken;    //16.用户当前会话的TOKEN全值JSON
    @AnTableField(column="EXPIRES_IN", type="int", notNull=true)    private int expiresIn;    //17.单位秒，为颁发授权到授权失效的时间差值
    @AnTableField(column="EXPIRES_IN_R1", type="int", notNull=true)    private int expiresInR1;    //18.单位秒，为颁发授权到授权R1失效的时间差值
    @AnTableField(column="EXPIRES_IN_R2", type="int", notNull=true)    private int expiresInR2;    //19.单位秒，为颁发授权到授权R2失效的时间差值
    @AnTableField(column="EXPIRES_IN_W1", type="int", notNull=true)    private int expiresInW1;    //20.单位秒，为颁发授权到授权W1失效的时间差值
    @AnTableField(column="EXPIRES_IN_W2", type="int", notNull=true)    private int expiresInW2;    //21.单位秒，为颁发授权到授权W2失效的时间差值
    @AnTableField(column="REFRESH_TOKEN", type="string,256", notNull=true)    private String refreshToken;    //22.刷新Token
    @AnTableField(column="RE_EXPIRES_IN", type="int", notNull=true)    private int reExpiresIn;    //23.单位秒，为失效时间到授权开始时间的差值
    @AnTableField(column="ITEM_NUM", type="int", notNull=true)    private int itemNum;    //24.用户宝贝个数
    @AnTableField(column="LEVEL", type="int", notNull=true)    private int level;    //25.用户卖家信用等级,共20级别，1表时一心，2表示二心
    @AnTableField(column="CREATE_TIME", type="string,19,char", notNull=true)    private String createTime;    //26.用户创建时间
    @AnTableField(column="LAST_LOGIN_TIME", type="string,19,char", notNull=true)    private String lastLoginTime;    //27.最后一次登录时间
    @AnTableField(column="VERSION_NO", type="int", notNull=true)    private int versionNo;    //28.用户版本号,0表示试用版,5表示标准版，10表示尊享版
    @AnTableField(column="START_DATE", type="string,10", notNull=false)    private String startDate;    //29.用户订购起始日期
    @AnTableField(column="END_DATE", type="string,10", notNull=false)    private String endDate;    //30.用户订购结束日期
    @AnTableField(column="SHOP_ID", type="int", notNull=false)    private int shopId;    //31.店铺ID，用于返回店铺shop+${SHOP_ID}.taobao.com
    @AnTableField(column="SHOP_PIC", type="string,512", notNull=false)    private String shopPic;    //32.店标，图片地址
    @AnTableField(column="SHOP_TITLE", type="string,512", notNull=false)    private String shopTitle;    //33.店铺标题
    @AnTableField(column="ITEM_UPDATE_TIME", type="string,19", notNull=false)    private String itemUpdateTime;    //34.宝贝更新时间，格式yyyy-MM-dd HH:mm:ss
    @AnTableField(column="TYPE", type="string,1", notNull=false)    private String type;    //35.用户类型,C（C商家）,B(B商家)
    @AnTableField(column="LOWEST_DISCOUNT", type="string,20", notNull=false)    private String lowestDiscount;    //36.最低折扣
    @AnTableField(column="AUTO_REPOST_LIMITED", type="byte", notNull=false)    private int autoRepostLimited;    //37.是否重发限制，1限制，0不限制。对应淘宝可选值:0=unlimited(不受限),1=limited(受限制)
    @AnTableField(column="EMAIL", type="string,50", notNull=false)    private String email;    //38.用户邮件
    @AnTableField(column="MOBILE", type="string,11", notNull=false)    private String mobile;    //39.用户手机号
    @AnTableField(column="BIRTHDAY", type="string,20", notNull=false)    private String birthday;    //40.用户生日
    @AnTableField(column="AVATAR", type="string,512", notNull=false)    private String avatar;    //41.用户头像
    @AnTableField(column="ALIPAY_ACCOUNT", type="string,50", notNull=false)    private String alipayAccount;    //42.支付宝账号
    @AnTableField(column="SELF_ADDR_MODIFY", type="boolean", notNull=true)    private boolean selfAddrModify;    //43.自助改地址是否开启
    @AnTableField(column="TB_DAIFA_ROLE_USER_ID", type="long", notNull=true)    private long tbDaifaRoleUserId;    //44.打发场景，分销商，供应商的 ID
    @AnTableField(column="TB_DAIFA_ROLE", type="string,64", notNull=true)    private String tbDaifaRole;    //45.淘宝打发场景，供应商，分销商，的类型， NO_ROLE-未入驻  DISTRITOR-分销商  SUPPLIER-供货商
    @AnTableField(column="TB_DAIFA_USER_NAME", type="string,64", notNull=true)    private String tbDaifaUserName;    //46.淘宝打发场景，用户名

    public String toString()
    {
        return Jsons.toString(this);
    }

    public String getNick()
    {
        return nick;
    }

    public void setNick(String nick)
    {
        this.nick = nick;
    }

    public String getUserId()
    {
        return userId;
    }

    public void setUserId(String userId)
    {
        this.userId = userId;
    }

    public int getUserStatus()
    {
        return userStatus;
    }

    public void setUserStatus(int userStatus)
    {
        this.userStatus = userStatus;
    }

    public String getUserDomain()
    {
        return userDomain;
    }

    public void setUserDomain(String userDomain)
    {
        this.userDomain = userDomain;
    }

    public int getUserDb()
    {
        return userDb;
    }

    public void setUserDb(int userDb)
    {
        this.userDb = userDb;
    }

    public long getUserPoint()
    {
        return userPoint;
    }

    public void setUserPoint(long userPoint)
    {
        this.userPoint = userPoint;
    }

    public long getUserBalance()
    {
        return userBalance;
    }

    public void setUserBalance(long userBalance)
    {
        this.userBalance = userBalance;
    }

    public String getUserSrc()
    {
        return userSrc;
    }

    public void setUserSrc(String userSrc)
    {
        this.userSrc = userSrc;
    }

    public int getUserSmsNum()
    {
        return userSmsNum;
    }

    public void setUserSmsNum(int userSmsNum)
    {
        this.userSmsNum = userSmsNum;
    }

    public int getUserMailNum()
    {
        return userMailNum;
    }

    public void setUserMailNum(int userMailNum)
    {
        this.userMailNum = userMailNum;
    }

    public int getSyncTmc()
    {
        return syncTmc;
    }

    public void setSyncTmc(int syncTmc)
    {
        this.syncTmc = syncTmc;
    }

    public String getAppSessionId()
    {
        return appSessionId;
    }

    public void setAppSessionId(String appSessionId)
    {
        this.appSessionId = appSessionId;
    }

    public String getOpenUid()
    {
        return openUid;
    }

    public void setOpenUid(String openUid)
    {
        this.openUid = openUid;
    }

    public String getSessionId()
    {
        return sessionId;
    }

    public void setSessionId(String sessionId)
    {
        this.sessionId = sessionId;
    }

    public String getSessionTime()
    {
        return sessionTime;
    }

    public void setSessionTime(String sessionTime)
    {
        this.sessionTime = sessionTime;
    }

    public String getSessionToken()
    {
        return sessionToken;
    }

    public void setSessionToken(String sessionToken)
    {
        this.sessionToken = sessionToken;
    }

    public int getExpiresIn()
    {
        return expiresIn;
    }

    public void setExpiresIn(int expiresIn)
    {
        this.expiresIn = expiresIn;
    }

    public int getExpiresInR1()
    {
        return expiresInR1;
    }

    public void setExpiresInR1(int expiresInR1)
    {
        this.expiresInR1 = expiresInR1;
    }

    public int getExpiresInR2()
    {
        return expiresInR2;
    }

    public void setExpiresInR2(int expiresInR2)
    {
        this.expiresInR2 = expiresInR2;
    }

    public int getExpiresInW1()
    {
        return expiresInW1;
    }

    public void setExpiresInW1(int expiresInW1)
    {
        this.expiresInW1 = expiresInW1;
    }

    public int getExpiresInW2()
    {
        return expiresInW2;
    }

    public void setExpiresInW2(int expiresInW2)
    {
        this.expiresInW2 = expiresInW2;
    }

    public String getRefreshToken()
    {
        return refreshToken;
    }

    public void setRefreshToken(String refreshToken)
    {
        this.refreshToken = refreshToken;
    }

    public int getReExpiresIn()
    {
        return reExpiresIn;
    }

    public void setReExpiresIn(int reExpiresIn)
    {
        this.reExpiresIn = reExpiresIn;
    }

    public int getItemNum()
    {
        return itemNum;
    }

    public void setItemNum(int itemNum)
    {
        this.itemNum = itemNum;
    }

    public int getLevel()
    {
        return level;
    }

    public void setLevel(int level)
    {
        this.level = level;
    }

    public String getCreateTime()
    {
        return createTime;
    }

    public void setCreateTime(String createTime)
    {
        this.createTime = createTime;
    }

    public String getLastLoginTime()
    {
        return lastLoginTime;
    }

    public void setLastLoginTime(String lastLoginTime)
    {
        this.lastLoginTime = lastLoginTime;
    }

    public int getVersionNo()
    {
        return versionNo;
    }

    public void setVersionNo(int versionNo)
    {
        this.versionNo = versionNo;
    }

    public String getStartDate()
    {
        return startDate;
    }

    public void setStartDate(String startDate)
    {
        this.startDate = startDate;
    }

    public String getEndDate()
    {
        return endDate;
    }

    public void setEndDate(String endDate)
    {
        this.endDate = endDate;
    }

    public int getShopId()
    {
        return shopId;
    }

    public void setShopId(int shopId)
    {
        this.shopId = shopId;
    }

    public String getShopPic()
    {
        return shopPic;
    }

    public void setShopPic(String shopPic)
    {
        this.shopPic = shopPic;
    }

    public String getShopTitle()
    {
        return shopTitle;
    }

    public void setShopTitle(String shopTitle)
    {
        this.shopTitle = shopTitle;
    }

    public String getItemUpdateTime()
    {
        return itemUpdateTime;
    }

    public void setItemUpdateTime(String itemUpdateTime)
    {
        this.itemUpdateTime = itemUpdateTime;
    }

    public String getType()
    {
        return type;
    }

    public void setType(String type)
    {
        this.type = type;
    }

    public String getLowestDiscount()
    {
        return lowestDiscount;
    }

    public void setLowestDiscount(String lowestDiscount)
    {
        this.lowestDiscount = lowestDiscount;
    }

    public int getAutoRepostLimited()
    {
        return autoRepostLimited;
    }

    public void setAutoRepostLimited(int autoRepostLimited)
    {
        this.autoRepostLimited = autoRepostLimited;
    }

    public String getEmail()
    {
        return email;
    }

    public void setEmail(String email)
    {
        this.email = email;
    }

    public String getMobile()
    {
        return mobile;
    }

    public void setMobile(String mobile)
    {
        this.mobile = mobile;
    }

    public String getBirthday()
    {
        return birthday;
    }

    public void setBirthday(String birthday)
    {
        this.birthday = birthday;
    }

    public String getAvatar()
    {
        return avatar;
    }

    public void setAvatar(String avatar)
    {
        this.avatar = avatar;
    }

    public String getAlipayAccount()
    {
        return alipayAccount;
    }

    public void setAlipayAccount(String alipayAccount)
    {
        this.alipayAccount = alipayAccount;
    }

    public boolean isSelfAddrModify()
    {
        return selfAddrModify;
    }

    public void setSelfAddrModify(boolean selfAddrModify)
    {
        this.selfAddrModify = selfAddrModify;
    }

    public long getTbDaifaRoleUserId()
    {
        return tbDaifaRoleUserId;
    }

    public void setTbDaifaRoleUserId(long tbDaifaRoleUserId)
    {
        this.tbDaifaRoleUserId = tbDaifaRoleUserId;
    }

    public String getTbDaifaRole()
    {
        return tbDaifaRole;
    }

    public void setTbDaifaRole(String tbDaifaRole)
    {
        this.tbDaifaRole = tbDaifaRole;
    }

    public String getTbDaifaUserName()
    {
        return tbDaifaUserName;
    }

    public void setTbDaifaUserName(String tbDaifaUserName)
    {
        this.tbDaifaUserName = tbDaifaUserName;
    }

}
